Skip to content

feat(request): JSON envelope output by default - #87

Merged
yusukebe merged 2 commits into
nextfrom
feat/request-json
Aug 17, 2026
Merged

feat(request): JSON envelope output by default#87
yusukebe merged 2 commits into
nextfrom
feat/request-json

Conversation

@yusukebe

Copy link
Copy Markdown
Member

Move request to the shared JSON envelope (part of #77, same as build in #85).

  • Default output is { ok, data: { status, headers, body } }. A JSON response body is embedded as an object, so it is not double-escaped
  • -J, --json is gone. --plain prints the raw body like curl (-i / -I work with it)
  • A binary body becomes body: null with binary: true. -o / -O now always save the raw body and add savedTo to the output
  • Errors are the shared JSON error with exit code 1 (e.g. ENTRY_NOT_FOUND)

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run format:fix && pnpm run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@yusukebe
yusukebe merged commit 68c20f5 into next Aug 17, 2026
4 checks passed
@yusukebe
yusukebe deleted the feat/request-json branch August 17, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant